<?php
			$yhendus=new mysqli("localhost", "if11", "4e3HtHTXGXQC8uas", "if11_rnrz");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Suusavõistlus</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="style.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
<div id="header">
	<div id="menu">
		<ul>
			<li><a href="index.html">Avaleht</a></li>
			<li><a href="Stardipunkt.php">Stardipunkt</a></li>
			<li><a href="finish.php">Finiš</a></li>
			<li class="active"><a href="statistika.php">Statistika</a></li>
			
		</ul>
	</div>
	<!-- end #menu -->
	<div id="logo">
		<h1><a href="#">Suusavõistlus </a></h1>
	</div>
	<hr />
</div>

<div id="page">
	<div id="page-bgtop">
		<div id="page-bgbtm">
			<div id="content">
				<div class="post">
					<h2 class="title"><a href="#">Statistika </a></h2>
					<div class="entry">
						<table cellspacing="10">
		 <tr>
		   <td><h2>Id</h2></td>
		   <td><h2>Algusaeg</h2></td>
		   <td><h2>Lõppaeg</h2></td>
		 </tr>
<?php

             $kask=$yhendus->prepare("SELECT id, algusaeg, loppaeg FROM voistlejad WHERE algusaeg!=0 AND loppaeg!=0");
             $kask->bind_result($id, $algusaeg, $loppaeg);
             $kask->execute();
             while($kask->fetch()){
			   echo "
			   <tr>
			   <td>$id</td>
			   <td>$algusaeg</td>
			   <td>$loppaeg</td>
			   </tr>
			   ";
			
               
			 }
          ?>
		  <table>
					</div>
					
				</div>
				
			</div>
			<!-- end #content -->
			<div id="sidebar">
				<ul>
					<li>
						
					</li>
				</ul>
			</div>
			<!-- end #sidebar -->
			<div style="clear: both;">&nbsp;</div>
		</div>
		<!-- end #page -->
	</div>
</div>
<div id="footer-bgcontent">
	<div id="footer">
		
	</div>
	<!-- end #footer -->
</div>
</body>
</html>
